﻿@using Tienda.Models
@model AgregarProducoModel
@{
    ViedojuegosEntities vjs = new ViedojuegosEntities();
    List<Categoria> categoria = vjs.Categoria.ToList();
    ViewBag.CategP = categoria;
    ViewBag.Title = "AgregarProductos";
}
<div id="formingcliente">
    <div class="wrapper">
        <img src="~/Content/img/post-divider.png" />
        <br />
        <br />
        <h2>Agregar un Producto</h2>
        <br />
        <br />
        @using (Html.BeginForm("AgregarProductos", "Producto", FormMethod.Post))
        {
            @Html.DisplayNameFor(a => a.Nombre)<br />
            @Html.TextBoxFor(a => a.Nombre)
            @Html.ValidationMessageFor(a => a.Nombre)<br />
            //--------------------------------------------
            @Html.DisplayNameFor(a => a.Descripcion)<br />
            @Html.TextBoxFor(a => a.Descripcion)
            @Html.ValidationMessageFor(a => a.Descripcion)<br />
            //--------------------------------------------
            @Html.DisplayNameFor(a => a.Precio)<br />
            @Html.TextBoxFor(a => a.Precio)
            @Html.ValidationMessageFor(a => a.Precio)<br />
            //--------------------------------------------
            @Html.DisplayNameFor(a => a.Bodega.Stock)<br />
            @Html.TextBoxFor(a => a.Bodega.Stock)
            @Html.ValidationMessageFor(a => a.Bodega.Stock)<br />
            //--------------------------------------------
            @Html.DisplayName("Categoria")<br />
            @Html.DropDownListFor(b => b.idCategoria, new SelectList(ViewBag.CategP, "idCategoria", "NombreCategoria"), "Seleccione Categoria")
            @Html.ValidationMessageFor(b => b.idCategoria)<br />
            <br />
            
            <div>
                <input type='submit' value='Guardar' class='boton' name='boton' id="Enviar">
            </div>
            <br />
        }
        <img src="~/Content/img/post-divider-inverted.png" />
    </div>
</div>